#ifndef QUERY_RESULT_H
#define QUERY_RESULT_H 1

#include <common/macro/build.h>

typedef enum result_e {
	RESULT_OK = 0,
	RESULT_ENDOFRESULTS,
	
	RESULT_EIO,
	RESULT_ELOCK,
	RESULT_DEADLOCK,
	RESULT_ETRANSACTION,
	RESULT_PAGETYPEMM,
	RESULT_PAGECORRUPT,
	RESULT_DATATOOLARGE,
	RESULT_INVALIDCOMMAND,
	RESULT_CONDITIONERR,
	RESULT_INVALIDTABLE,
	RESULT_INVALIDCOLUMN,
	RESULT_MISSINGDATA,
	RESULT_TOOMANYCOMMANDS,
} result_e;

inline API_PUBLIC const char *result_text(result_e);
inline API_PUBLIC int result_eod(result_e);
inline API_PUBLIC int result_error(result_e);
inline API_PUBLIC int result_ok(result_e);

#endif
